<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<RaisingStudio.Data.Entities.Issue>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>
    <div>
        <% using (Html.BeginForm())
           {%>
        <fieldset>
            <label for="Filter">
                Filter:</label>
            <%=Html.TextBox("Filter")%>
            <input type="submit" value="Filter" />
            <%=Html.ActionLink("Show All", "Index") %>
        </fieldset>
        <%} %>
    </div>

    <table>
        <tr>
            <th></th>
            <th>
                IssueID
            </th>
            <th>
                Title
            </th>
            <th>
                Description
            </th>
            <th>
                Owner
            </th>
            <th>
                Progress
            </th>
            <th>
                CreateTime
            </th>
            <th>
                Locked
            </th>
            <th>
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new {  id = item.IssueID }) %>
                |
                <%= Html.ActionLink("Details", "Details", new { id = item.IssueID })%>
            </td>
            <td>
                <%= Html.Encode(item.IssueID) %>
            </td>
            <td>
                <%= Html.Encode(item.Title) %>
            </td>
            <td>
                <%= Html.Encode(item.Description) %>
            </td>
            <td>
                <%= Html.Encode(item.Owner) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.Progress)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.CreateTime)) %>
            </td>
            <td>
                <%= Html.Encode(item.Locked) %>
            </td>
            <td>
                <%=Html.ActionLink("Delete", "Delete", new {id = item.IssueID}) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

